﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddNewAdministrator.aspx.cs" Inherits="Liguo.Administration.AddNewAdministrator" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>添加管理员</title>
             <script type="text/javascript">
                 function CheckInput() {
                     var usernamepass = true;
                     usernamepass = !isEmpty("AdminName");
                     var pwpass = true;
                     //pwpass = document.getElementById("PassWord1").!=0;
                     pwpass = !isEmpty("Password1");
                     if (!usernamepass) {
                         alert('请填写用户名');
                         return false;
                     }
                     if (!pwpass) {
                         alert('请输入密码');
                         return false;
                     }
                 }
                 function isEmpty(name) {
                     return document.getElementById(name).value == "";
                 }
                 function isValid(name, pat) {
                     var s = document.getElementById(name).value;
                     return pat.exec(s);
                 }
         </script>
</head>
<body>
   <form id="form1" runat="server">
     <b>添加管理员</b><br>
    <div>
        <table>
            <tr>
                <td> 
        <asp:Label ID="Label1" runat="server" Text="用户名:"></asp:Label></td>
                <td>
                    <asp:TextBox ID="AdminName" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
        <asp:Label ID="Lable3" runat="server" Text="密码:"></asp:Label></td>
                <td>
                    <input id="Password1" type="password" runat="server"/>
                </td>
            </tr>
    </table>
         </div>
       <div>
          <asp:Button ID="submit" runat="server" Text="提交" OnClick="submit_Click" OnClientClick="return CheckInput()"/>
       </div>
    </form>
</body>
</html>
